package com.demo.service;

import com.demo.dao.DeptDao;
import com.demo.entity.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptDao deptDao;

    @Override
    public boolean addDept(Dept dept) {
        return deptDao.addDept(dept);
    }

    @Override
    public Dept get(Long id) {
        return deptDao.get(id);
    }

    @Override
    public List<Dept> listAll() {
        return deptDao.listAll();
    }
}
